﻿using QYmall.Core.Common.Emum;
using QYmall.Core.Model.Models;
using QYmall.Core.Model.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace QYmall.Core.IServices
{
    /// <summary>
    /// 订单收款接口
    /// </summary>
    public interface IOrderCollectionService : IBaseService
    {
        /// <summary>
        /// 查询一条记录
        /// </summary>
        Task<OrderCollection?> QueryAsync(Expression<Func<OrderCollection, bool>> funcWhere, WriteRoRead writeAndRead = WriteRoRead.Read);

        /// <summary>
        /// 确认收款
        /// </summary>
        Task<bool> ConfirmAsync(string tradeNo, WriteRoRead writeAndRead = WriteRoRead.Write);

        /// <summary>
        /// 取消收款
        /// </summary>
        Task<bool> CancelAsync(Expression<Func<OrderCollection, bool>> funcWhere, WriteRoRead writeAndRead = WriteRoRead.Write);

        /// <summary>
        /// 取消收款(计划任务)
        /// </summary>
        Task JobCancelAsync(WriteRoRead writeAndRead = WriteRoRead.Write);

        /// <summary>
        /// 根据条件删除记录
        /// </summary>
        Task<bool> DeleteAsync(Expression<Func<OrderCollection, bool>> funcWhere, WriteRoRead writeAndRead = WriteRoRead.Write);

        /// <summary>
        /// 修改支付方式(客户)
        /// </summary>
        Task<bool> PayAsync(OrderCollectionPaymentDto modelDto, WriteRoRead writeAndRead = WriteRoRead.Write);
    }
}
